home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / T2WIN-32.ZIP / _MEM.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-01  |  5.7 KB  |  173 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMem 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Memory status"
  5.    ClientHeight    =   4845
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7485
  9.    Height          =   5250
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4845
  14.    ScaleWidth      =   7485
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7605
  18.    Begin Threed.SSPanel SSPanel1 
  19.       Align           =   1  'Align Top
  20.       Height          =   480
  21.       Left            =   0
  22.       TabIndex        =   1
  23.       Top             =   0
  24.       Width           =   7485
  25.       _Version        =   65536
  26.       _ExtentX        =   13203
  27.       _ExtentY        =   847
  28.       _StockProps     =   15
  29.       ForeColor       =   -2147483640
  30.       BackColor       =   12632256
  31.       Begin VB.ComboBox cmb_Function 
  32.          Height          =   315
  33.          Left            =   1365
  34.          TabIndex        =   2
  35.          Top             =   90
  36.          Width           =   4785
  37.       End
  38.       Begin Threed.SSCommand cmdNP 
  39.          Height          =   300
  40.          Index           =   1
  41.          Left            =   7140
  42.          TabIndex        =   6
  43.          Top             =   90
  44.          Width           =   255
  45.          _Version        =   65536
  46.          _ExtentX        =   450
  47.          _ExtentY        =   529
  48.          _StockProps     =   78
  49.          Caption         =   ">"
  50.          BevelWidth      =   1
  51.          Font3D          =   3
  52.          RoundedCorners  =   0   'False
  53.          Outline         =   0   'False
  54.       End
  55.       Begin Threed.SSCommand cmdNP 
  56.          Height          =   300
  57.          Index           =   0
  58.          Left            =   6300
  59.          TabIndex        =   5
  60.          Top             =   90
  61.          Width           =   255
  62.          _Version        =   65536
  63.          _ExtentX        =   450
  64.          _ExtentY        =   529
  65.          _StockProps     =   78
  66.          Caption         =   "<"
  67.          BevelWidth      =   1
  68.          Font3D          =   3
  69.          RoundedCorners  =   0   'False
  70.          Outline         =   0   'False
  71.       End
  72.       Begin VB.Label Label2 
  73.          Caption         =   "&Select a function"
  74.          Height          =   255
  75.          Left            =   90
  76.          TabIndex        =   4
  77.          Top             =   120
  78.          Width           =   1275
  79.       End
  80.       Begin Threed.SSCommand SSCommand1 
  81.          Default         =   -1  'True
  82.          Height          =   300
  83.          Left            =   6615
  84.          TabIndex        =   3
  85.          Top             =   90
  86.          Width           =   465
  87.          _Version        =   65536
  88.          _ExtentX        =   820
  89.          _ExtentY        =   529
  90.          _StockProps     =   78
  91.          Caption         =   "&Go"
  92.          BevelWidth      =   1
  93.          RoundedCorners  =   0   'False
  94.          Outline         =   0   'False
  95.       End
  96.    End
  97.    Begin VB.Label lbl_Result 
  98.       Appearance      =   0  'Flat
  99.       BackColor       =   &H80000005&
  100.       BackStyle       =   0  'Transparent
  101.       ForeColor       =   &H80000008&
  102.       Height          =   4110
  103.       Left            =   90
  104.       TabIndex        =   0
  105.       Top             =   630
  106.       Width           =   7305
  107.    End
  108. Attribute VB_Name = "frmMem"
  109. Attribute VB_Creatable = False
  110. Attribute VB_Exposed = False
  111. Option Explicit
  112. Option Base 1
  113. Private Const Iteration = 250
  114. Dim IsLoaded         As Integer
  115. Dim TimerStartOk     As Integer
  116. Dim TimerCloseOk     As Integer
  117. Dim TimerHandle      As Integer
  118. Dim TimerValue       As Long
  119. Private Sub cmdNP_Click(Index As Integer)
  120.    Call sub_NextPrev(cmb_Function, Index)
  121. End Sub
  122. Private Sub cmb_Function_Click()
  123.    If (IsLoaded = False) Then Exit Sub
  124.    Call cDisableFI(mdiT2W.Picture1)
  125.    lbl_Result = ""
  126.    DoEvents
  127.    Select Case cmb_Function.ListIndex
  128.       Case 0
  129.          Call TestMemoryStatus
  130.    End Select
  131.    DoEvents
  132.    Call cEnableFI(mdiT2W.Picture1)
  133. End Sub
  134. Private Sub Form_Activate()
  135.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  136. End Sub
  137. Private Sub Form_Load()
  138.    IsLoaded = False
  139.    Show
  140.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_mem.t2w")
  141.    IsLoaded = True
  142. End Sub
  143. Private Sub SSCommand1_Click()
  144.    Call cmb_Function_Click
  145. End Sub
  146. Private Sub TestMemoryStatus()
  147.    Dim intResult        As Integer
  148.    Dim strResult        As String
  149.    Dim strDisplay       As String
  150.    Dim i                As Integer
  151.    Dim MSS              As tagMEMORYSTATUS
  152.    strResult = ""
  153.    strDisplay = ""
  154.    Call cMemoryStatus(MSS)
  155.    strDisplay = strDisplay & "dwMemoryLoad = " & MSS.dwMemoryLoad & vbCrLf
  156.    strDisplay = strDisplay & "dwTotalPhys = " & MSS.dwTotalPhys & vbCrLf
  157.    strDisplay = strDisplay & "dwAvailPhys = " & MSS.dwAvailPhys & vbCrLf
  158.    strDisplay = strDisplay & "dwTotalPageFile = " & MSS.dwTotalPageFile & vbCrLf
  159.    strDisplay = strDisplay & "dwAvailPageFile = " & MSS.dwAvailPageFile & vbCrLf
  160.    strDisplay = strDisplay & "dwTotalVirtual = " & MSS.dwTotalVirtual & vbCrLf
  161.    strDisplay = strDisplay & "dwAvailVirtual = " & MSS.dwAvailVirtual & vbCrLf
  162.      
  163.    lbl_Result = strDisplay
  164.    'time the function
  165.    TimerHandle = cTimerOpen()
  166.    TimerStartOk = cTimerStart(TimerHandle)
  167.    For i = 1 To Iteration
  168.       Call cMemoryStatus(MSS)
  169.    Next i
  170.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  171.    TimerCloseOk = cTimerClose(TimerHandle)
  172. End Sub
  173.